<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html 
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

    <h:head>
        <title>Tabularium</title>
        <script src="media/js/config.js"></script>
        <script src="media/js/skel.min.js"></script>
        <link rel="stylesheet" href="media/css/style.css" />
        <link rel="stylesheet" href="media/css/grid.css" />
        <link rel="stylesheet" href="media/css/style-desktop.css" />
        <link rel="stylesheet" href="media/css/style-wide.css" />
    </h:head>
    <h:body>

        <body class="left-sidebar">
            <!-- Wrapper -->
            <div id="wrapper">

                <!-- Content -->
                <div id="content">
                    <div id="content-inner">

                        <!-- Post -->
                        <article class="is-post is-post-excerpt">
                            #{managerLayout.primeiroAcesso()}

                            <header>
                                <p:panel rendered="#{managerLayout.primeiroAcesso}">
                                    <h2><a href="#">Criar senha de acesso ao sistema</a></h2>
                                </p:panel>
                                <p:panel rendered="#{!managerLayout.primeiroAcesso}">
                                    <h2><a href="#">Error 404 - Página não encontrada</a></h2>
                                </p:panel>
                            </header>
                            <div class="info">

                                <span class="date">
                                    <span class="month">#{managerLayout.mes}
                                        <span>uary</span>
                                    </span> 
                                    <span class="day">#{managerLayout.dia}</span>
                                    <span class="year">#{managerLayout.ano}</span>
                                    <div class="clear"/>
                                    <p:clock pattern="HH:mm:ss"/>
                                </span>

                            </div>

                            <ui:insert name="body">

                                <p:panel rendered="#{managerLayout.primeiroAcesso}" styleClass="container_24 clearfix">
                                    <h:form id="clienteForm" enctype="multipart/form-data">            
                                        <p:messages id="messages" closable="true" showDetail="true" autoUpdate="true" />
                                        <p:poll interval="1" listener="#{managerLayout.increment()}"
                                                update="count" widgetVar="poll" autoStart="true"/>
                                        <p:outputLabel id="count" value="#{managerLayout.mensagem()}" />
                                        <p>  
                                            <p:panel id="loginPanel" styleClass="container_24 clearfix">
                                                <h2><a href="#">Cadastrar senha</a></h2>
                                                <br/>
                                                <p:outputLabel 
                                                    value="Olá #{managerLayout.nomeUsuarioViaToken}, cadastre sua senha para poder acessar o sistema Tabulario"/>
                                                <div class="clear"/> <br/>
                                                <p:outputLabel value="Senha: " styleClass="grid_3"/>
                                                <p:password styleClass="grid_10"  value="#{managerLayout.novaSenha}" feedback="true"/>
                                                <div class="clear"/>
                                                <p:outputLabel value="Repetir Senha: " styleClass="grid_4" style="margin-left: -27px"/>
                                                <p:password styleClass="grid_10"  value="#{managerLayout.senha}" feedback="true"/>
                                            </p:panel>

                                            <br/>
                                            <br/>
                                            <div class="buttonAction">
                                                <p:commandButton value="Salvar" actionListener="#{managerLayout.atualizarLoginPrimeiroAcesso()}" 
                                                                 icon="ui-icon-disk" styleClass="ui-priority-primary"
                                                                 update="@form"  />
                                                <p:button value="Cancelar" icon="ui-icon-circle-close"
                                                          href="indexusuario.xhtml" />
                                            </div>
                                        </p>
                                    </h:form>
                                </p:panel>

                                <p:panel rendered="#{!managerLayout.primeiroAcesso}">
                                    <p:outputLabel style="font-size: 18px"
                                                   value="O link que você está acessando não foi encontrado ou não está mais disponível !" />
                                </p:panel>
                            </ui:insert>
                        </article>
                    </div>
                </div>

                <!-- Sidebar -->
                <div id="sidebar">
                    <div class="loggeduser">
<!--                        <h:form prependId="false">
                            <p>Olá <a href="#">{managerLayout.user}</a> | 
                                <p:commandLink actionListener="{managerLayout.logout()}" >Sair</p:commandLink></p>
                        </h:form>-->
                    </div>
                    <!-- Logo -->
                    <a href="/Tabularium-war">
                        <div id="logo">
                            <img src="media/images/logo.png" class="logo" />
                        </div>
                    </a>

                    <!-- Nav -->
                    <nav id="nav">
                        <ul>
                        </ul>
                    </nav>

                    <!-- Copyright -->
                    <div id="copyright">
                        <p>
                            &copy; 2014 <a href="http://foxinline.com">Fox in Line Technologies</a>.<br />
                        </p>
                    </div>

                </div>

            </div>

        </body>
    </h:body>
</html>
